Skip to content

[bug](cloud restore) rewrite table properties and partition info in cloud restore#63696

Open
xy720 wants to merge 9 commits into
apache:masterfrom
xy720:fix-restore-dynamic-property
Open

[bug](cloud restore) rewrite table properties and partition info in cloud restore#63696
xy720 wants to merge 9 commits into
apache:masterfrom
xy720:fix-restore-dynamic-property

Conversation

@xy720
Copy link
Copy Markdown
Member

@xy720 xy720 commented May 26, 2026

What problem does this PR solve?

In cloud mode, rewrite all unsupported table properties and some partition info from the source cluster.

These table properties (e.g., dynamic_partition.replication_num, dynamic_partition.replication_allocation, dynamic_partition.storage_policy, in_memory, storage_medium,min_load_replica_num...) are not applicable in cloud mode.

And rewrite some non-applicable partition info as well.

If kept, they would cause some critical problems.

For example, dynamic partition scheduler creates new partitions with source cluster replication settings, leading to write failures like: "alive replica num < 1 load required replica num 2".

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@xy720
Copy link
Copy Markdown
Member Author

xy720 commented May 26, 2026

run buildall

@xy720
Copy link
Copy Markdown
Member Author

xy720 commented May 26, 2026

/reviews

@xy720
Copy link
Copy Markdown
Member Author

xy720 commented May 26, 2026

/review

@xy720
Copy link
Copy Markdown
Member Author

xy720 commented May 26, 2026

run buildall

@xy720
Copy link
Copy Markdown
Member Author

xy720 commented May 26, 2026

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review conclusion: request changes. The PR is small and targeted at making restored dynamic partition properties cloud-safe, but the restore cleanup is incomplete: it leaves dynamic_partition.storage_medium in the persisted dynamic partition properties even though cloud-mode property rewriting removes that key during normal DDL. That lets the dynamic partition scheduler keep generating per-partition storage_medium/storage_cooldown_time properties after restore, so a restored table can still diverge from cloud create/alter behavior.

Critical checkpoints:

  • Goal/test: the goal is only partially met; no test covers cloud restore dynamic partition property cleanup.
  • Scope: the change is small and focused.
  • Concurrency/lifecycle/config: no new concurrency, lifecycle, or config risks found.
  • Compatibility/persistence: restore mutates persisted table properties; the missing storage_medium cleanup affects post-restore behavior.
  • Parallel paths: normal cloud DDL removes dynamic_partition.storage_medium via CloudPropertyAnalyzer, but restore does not.
  • Testing: existing non-cloud unit coverage is not extended for the new cloud path.
  • Observability/performance: no additional concerns found.

User focus: no additional user-provided review focus was specified.

Comment thread fe/fe-core/src/main/java/org/apache/doris/catalog/TableProperty.java Outdated
@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31772 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit ccaf3d3c03a5e446438029b680ae786103f7f1b0, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17874	4092	4023	4023
q2	q3	10769	1362	821	821
q4	4710	483	338	338
q5	7994	2272	2084	2084
q6	361	178	141	141
q7	966	782	656	656
q8	9374	1725	1687	1687
q9	6873	4963	4971	4963
q10	6457	2205	1886	1886
q11	438	272	249	249
q12	693	433	299	299
q13	18182	3302	2734	2734
q14	267	258	236	236
q15	q16	817	767	708	708
q17	926	918	927	918
q18	7168	5677	5635	5635
q19	1573	1351	1108	1108
q20	526	423	254	254
q21	6520	2720	2727	2720
q22	463	369	312	312
Total cold run time: 102951 ms
Total hot run time: 31772 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4968	5056	4870	4870
q2	q3	4993	5344	4677	4677
q4	2162	2255	1449	1449
q5	5050	4805	4640	4640
q6	230	181	129	129
q7	1915	1748	1562	1562
q8	2283	2039	1982	1982
q9	7768	7494	7510	7494
q10	4795	4690	4246	4246
q11	566	416	360	360
q12	743	748	548	548
q13	3092	3436	2770	2770
q14	283	287	263	263
q15	q16	687	713	617	617
q17	1306	1294	1281	1281
q18	7330	6916	6979	6916
q19	1084	1101	1105	1101
q20	2238	2223	1964	1964
q21	5434	4730	4578	4578
q22	534	475	402	402
Total cold run time: 57461 ms
Total hot run time: 51849 ms

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review completed for PR 63696.

Summary opinion: no blocking correctness issues found. The change is small and focused: during restore in cloud mode, unsupported dynamic partition restore properties are removed and the in-memory DynamicPartitionProperty is rebuilt before the restored table is used by the dynamic partition scheduler.

Critical checkpoint conclusions:

  • Goal and proof: The goal is to prevent restored cloud tables from carrying source-cluster dynamic partition replication/storage-policy settings. The code accomplishes this for the restore path; existing restore flow also forces reserveReplica=false in cloud mode before calling this method.
  • Scope: The modification is minimal and localized to TableProperty.resetPropertiesForRestore.
  • Concurrency/lifecycle: No new concurrency or special lifecycle risk identified; restore mutates table metadata in the existing restore preparation flow before publishing the restored table.
  • Configuration/compatibility: No new config item or serialization/storage format change.
  • Parallel paths: Reviewed the restore caller and cloud restore constructor; the cloud restore path reaches this same reset method.
  • Data correctness/persistence: The properties map and rebuilt dynamicPartitionProperty remain consistent after removing unsupported dynamic properties.
  • Tests: I did not run tests in this review. The PR does not add a dedicated test, so residual risk is lack of explicit coverage for cloud restore with dynamic partition properties.
  • Observability/performance: No new observability need or performance concern for this metadata-only path.

User focus: no additional user-provided review focus was specified.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the actual GitHub PR diff, which contains the cloud restore cleanup in TableProperty. I did not find a blocking issue.

Critical checkpoint conclusions:

  • Goal/test proof: the change removes cloud-unsupported dynamic partition restore properties before rebuilding DynamicPartitionProperty, which matches the stated restore failure mode. I did not see a new test in this PR, so coverage for cloud restore remains the main gap.
  • Scope/focus: the final diff is small and focused on restore-time table property normalization.
  • Concurrency/lifecycle: no concurrency or special lifecycle concern identified.
  • Configuration/compatibility: no new config or persisted format change; it only strips source-cluster dynamic partition keys during restore in cloud mode.
  • Parallel paths: non-cloud restore still rebuilds dynamic partition properties only when dynamic partition is present; cloud path now normalizes unsupported keys before rebuild.
  • Tests: no tests were added or changed in the final PR diff.
  • Observability: existing behavior is sufficient for this small normalization.
  • Transactions/persistence/data writes: restore mutates the staged remote table properties before use; I did not find an edit-log/replay issue in this change.
  • Performance: no performance concern identified.

User focus response: the focus file only contained ; I found no additional focus-specific issue.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the actual GitHub PR diff, which contains the cloud restore cleanup in TableProperty. I did not find a blocking issue.

Critical checkpoint conclusions:

  • Goal/test proof: the change removes cloud-unsupported dynamic partition restore properties before rebuilding DynamicPartitionProperty, which matches the stated restore failure mode. I did not see a new test in this PR, so coverage for cloud restore remains the main gap.
  • Scope/focus: the final diff is small and focused on restore-time table property normalization.
  • Concurrency/lifecycle: no concurrency or special lifecycle concern identified.
  • Configuration/compatibility: no new config or persisted format change; it only strips source-cluster dynamic partition keys during restore in cloud mode.
  • Parallel paths: non-cloud restore still rebuilds dynamic partition properties only when dynamic partition is present; cloud path now normalizes unsupported keys before rebuild.
  • Tests: no tests were added or changed in the final PR diff.
  • Observability: existing behavior is sufficient for this small normalization.
  • Transactions/persistence/data writes: restore mutates the staged remote table properties before use; I did not find an edit-log/replay issue in this change.
  • Performance: no performance concern identified.

User focus response: the focus file only contained s; I found no additional focus-specific issue.

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 30994 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 8dcf75f3c585f6b45c9135beb4eeb183de2a4cba, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	18018	3966	3935	3935
q2	q3	10790	1385	805	805
q4	4682	469	347	347
q5	7557	2238	2070	2070
q6	235	173	136	136
q7	934	802	626	626
q8	9400	1634	1546	1546
q9	6177	4993	4964	4964
q10	6446	2231	1870	1870
q11	441	264	243	243
q12	690	428	296	296
q13	18231	3352	2763	2763
q14	269	262	235	235
q15	q16	824	766	708	708
q17	992	929	995	929
q18	6851	5666	5553	5553
q19	1235	1214	1103	1103
q20	529	404	261	261
q21	5603	2600	2304	2304
q22	435	359	300	300
Total cold run time: 100339 ms
Total hot run time: 30994 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4330	4229	4289	4229
q2	q3	4484	4948	4358	4358
q4	2087	2220	1410	1410
q5	4457	4304	4300	4300
q6	231	172	132	132
q7	2316	1910	1641	1641
q8	2469	2212	2110	2110
q9	8169	7886	7973	7886
q10	4798	4763	4360	4360
q11	560	606	409	409
q12	754	759	557	557
q13	3301	3636	2994	2994
q14	297	325	300	300
q15	q16	713	734	677	677
q17	1359	1346	1344	1344
q18	7986	7414	6918	6918
q19	1110	1075	1119	1075
q20	2211	2229	1976	1976
q21	5293	4622	4442	4442
q22	521	459	434	434
Total cold run time: 57446 ms
Total hot run time: 51552 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 172438 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit ccaf3d3c03a5e446438029b680ae786103f7f1b0, data reload: false

query5	4307	663	519	519
query6	331	230	200	200
query7	4221	580	333	333
query8	321	234	219	219
query9	8831	4072	4043	4043
query10	459	345	308	308
query11	5759	2545	2252	2252
query12	184	132	128	128
query13	1305	612	447	447
query14	6188	5567	5220	5220
query14_1	4553	4584	4539	4539
query15	220	206	188	188
query16	1013	466	466	466
query17	1134	743	604	604
query18	2776	493	360	360
query19	227	199	164	164
query20	136	135	134	134
query21	216	146	123	123
query22	13791	13664	13405	13405
query23	17403	16608	16264	16264
query23_1	16557	16340	16463	16340
query24	7530	1788	1334	1334
query24_1	1346	1337	1345	1337
query25	555	509	431	431
query26	1318	319	172	172
query27	2710	533	342	342
query28	4436	2018	1977	1977
query29	1013	656	512	512
query30	313	247	200	200
query31	1143	1081	962	962
query32	100	79	75	75
query33	548	360	303	303
query34	1191	1138	657	657
query35	785	825	721	721
query36	1400	1445	1300	1300
query37	147	99	85	85
query38	3228	3181	3060	3060
query39	930	924	930	924
query39_1	864	867	863	863
query40	225	143	120	120
query41	68	62	60	60
query42	108	108	108	108
query43	327	327	291	291
query44	
query45	215	201	197	197
query46	1087	1181	752	752
query47	2375	2358	2248	2248
query48	401	452	307	307
query49	629	502	381	381
query50	971	337	251	251
query51	4431	4367	4249	4249
query52	103	107	94	94
query53	253	274	209	209
query54	319	264	251	251
query55	94	93	87	87
query56	296	307	300	300
query57	1446	1432	1367	1367
query58	297	260	287	260
query59	1624	1672	1512	1512
query60	314	315	304	304
query61	159	160	153	153
query62	691	646	578	578
query63	235	199	207	199
query64	2397	797	629	629
query65	
query66	1680	483	362	362
query67	29744	29756	29548	29548
query68	
query69	442	345	341	341
query70	1020	935	1024	935
query71	305	273	263	263
query72	3009	2663	2406	2406
query73	857	777	456	456
query74	5158	4975	4860	4860
query75	2686	2609	2279	2279
query76	2268	1131	758	758
query77	404	417	346	346
query78	12320	12577	11896	11896
query79	1501	1039	753	753
query80	1350	525	451	451
query81	515	283	234	234
query82	1169	174	130	130
query83	357	275	244	244
query84	257	140	115	115
query85	922	521	449	449
query86	463	385	345	345
query87	3453	3417	3260	3260
query88	3610	2751	2727	2727
query89	466	393	341	341
query90	1899	192	181	181
query91	175	164	142	142
query92	80	76	72	72
query93	1581	1467	882	882
query94	733	336	319	319
query95	687	454	337	337
query96	1051	767	337	337
query97	2751	2739	2613	2613
query98	234	232	230	230
query99	1159	1163	1039	1039
Total cold run time: 257181 ms
Total hot run time: 172438 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 171690 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 8dcf75f3c585f6b45c9135beb4eeb183de2a4cba, data reload: false

query5	4319	666	542	542
query6	355	215	205	205
query7	4360	562	315	315
query8	337	258	237	237
query9	8870	4090	4091	4090
query10	457	339	311	311
query11	5808	2546	2214	2214
query12	178	129	126	126
query13	1273	617	452	452
query14	6193	5531	5249	5249
query14_1	4529	4548	4523	4523
query15	215	206	189	189
query16	999	492	438	438
query17	1174	751	616	616
query18	2500	517	357	357
query19	207	201	156	156
query20	140	127	129	127
query21	216	140	115	115
query22	13612	13573	13419	13419
query23	17442	16491	16202	16202
query23_1	16394	16380	16422	16380
query24	7408	1766	1286	1286
query24_1	1325	1284	1315	1284
query25	544	483	409	409
query26	1294	334	178	178
query27	2692	554	352	352
query28	4458	2000	2009	2000
query29	997	634	502	502
query30	298	241	193	193
query31	1131	1094	971	971
query32	120	79	76	76
query33	587	359	294	294
query34	1178	1184	658	658
query35	776	793	721	721
query36	1481	1455	1267	1267
query37	153	110	93	93
query38	3329	3195	3101	3101
query39	921	923	894	894
query39_1	886	886	875	875
query40	228	144	123	123
query41	66	63	61	61
query42	108	109	106	106
query43	326	342	312	312
query44	
query45	214	203	198	198
query46	1070	1175	793	793
query47	2408	2353	2270	2270
query48	401	413	309	309
query49	637	500	402	402
query50	978	345	253	253
query51	4316	4359	4228	4228
query52	104	106	95	95
query53	267	285	207	207
query54	314	289	276	276
query55	95	95	90	90
query56	314	336	340	336
query57	1411	1427	1356	1356
query58	316	289	281	281
query59	1600	1725	1454	1454
query60	337	334	324	324
query61	183	186	185	185
query62	705	656	598	598
query63	245	209	207	207
query64	2476	858	690	690
query65	
query66	1791	505	374	374
query67	29656	29697	28867	28867
query68	
query69	518	339	300	300
query70	1012	988	1013	988
query71	327	278	267	267
query72	2966	2703	2387	2387
query73	844	776	465	465
query74	5106	4981	4797	4797
query75	2715	2608	2288	2288
query76	2288	1156	771	771
query77	410	417	344	344
query78	12414	12406	11819	11819
query79	1473	1007	742	742
query80	1284	562	464	464
query81	530	284	241	241
query82	1016	157	126	126
query83	349	273	251	251
query84	258	137	114	114
query85	945	567	456	456
query86	462	356	322	322
query87	3422	3376	3248	3248
query88	3655	2761	2727	2727
query89	453	392	343	343
query90	1925	191	181	181
query91	176	168	138	138
query92	80	79	71	71
query93	1550	1430	868	868
query94	709	383	306	306
query95	658	467	360	360
query96	1035	800	339	339
query97	2718	2698	2641	2641
query98	231	232	227	227
query99	1183	1155	1036	1036
Total cold run time: 255384 ms
Total hot run time: 171690 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 28.57% (2/7) 🎉
Increment coverage report
Complete coverage report

1 similar comment
@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 28.57% (2/7) 🎉
Increment coverage report
Complete coverage report

@xy720 xy720 changed the title [bug](cloud restore) remove unsupported dynamic partitition properties in cloud restore [bug](cloud restore) rewrite unsupported table properties in cloud restore May 27, 2026
@xy720 xy720 changed the title [bug](cloud restore) rewrite unsupported table properties in cloud restore [bug](cloud restore) rewrite table properties and partition info in cloud restore May 27, 2026
@xy720
Copy link
Copy Markdown
Member Author

xy720 commented May 27, 2026

/review

@xy720
Copy link
Copy Markdown
Member Author

xy720 commented May 27, 2026

run buildall

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found blocking issues in the actual GitHub PR diff. The already-open TableProperty dynamic storage-medium cleanup thread was treated as known context and is not duplicated here.

Critical checkpoint conclusions:

  • Goal/test coverage: the PR aims to sanitize restored table/partition properties for cloud mode, but the current code does not fully accomplish that goal and one changed file does not compile. No new restore test is included for these cloud-mode paths.
  • Scope/focus: the final PR diff is small and focused on restore property cleanup.
  • Concurrency/lifecycle: no concurrency or special lifecycle changes were introduced.
  • Config/compatibility: no new config was added; this affects restore behavior in cloud mode only.
  • Parallel paths: table-level and partition-level restore cleanup are both touched, but the table-level rewrite is ordered before later replica reset and can be undone.
  • Tests: missing cloud-mode restore coverage for table properties, partition properties, and dynamic partition properties.
  • Data correctness/observability: restore metadata can still retain unsupported replica allocation properties in cloud mode; existing logs are not directly relevant.

User focus: no additional user-provided review focus was supplied.

@xy720
Copy link
Copy Markdown
Member Author

xy720 commented May 27, 2026

run buildall

@xy720
Copy link
Copy Markdown
Member Author

xy720 commented May 27, 2026

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary: I found one additional cloud-restore correctness gap and left an inline comment. I did not repeat the already-known review threads about TableProperty rewrite ordering, the earlier missing Config import, or dynamic partition storage-medium cleanup.

Critical checkpoint conclusions:

  • Goal/test: The PR aims to strip unsupported cloud storage/replica properties during restore. It partially addresses full-table restore metadata, but an existing-partition restore path still persists source partition storage metadata. No new regression/unit test coverage is included in the PR.
  • Scope/focus: The code changes are small, but the fix is incomplete across parallel restore paths.
  • Concurrency/lifecycle: The touched code runs in restore metadata mutation paths under existing restore/table locking; I did not find new lock-order or lifecycle issues.
  • Config/compatibility: No new config item or storage format/protocol change is introduced.
  • Parallel code paths: Not fully covered; restoring partitions into an existing table still copies remote DataProperty/in-memory metadata.
  • Transaction/persistence/data correctness: The incomplete metadata cleanup can persist unsupported source-cluster partition storage settings in cloud mode.
  • FE/BE variable passing and observability: Not applicable to this PR.
  • Performance: No material performance issue found.

User focus: No additional user-provided review focus was specified.

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31447 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 05aef72e27e3a94aa3ca365928e89040cb49d65a, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17606	4037	3981	3981
q2	q3	10777	1384	792	792
q4	4684	485	348	348
q5	7659	2305	2065	2065
q6	240	175	137	137
q7	972	813	645	645
q8	9384	1637	1597	1597
q9	5150	4979	4976	4976
q10	6396	2266	1878	1878
q11	444	278	248	248
q12	636	435	300	300
q13	18114	3396	2763	2763
q14	268	259	232	232
q15	q16	826	778	719	719
q17	1012	994	1025	994
q18	7016	5768	5559	5559
q19	1301	1248	1023	1023
q20	702	467	292	292
q21	6072	2821	2592	2592
q22	516	420	306	306
Total cold run time: 99775 ms
Total hot run time: 31447 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4720	4776	4719	4719
q2	q3	5007	5222	4753	4753
q4	2081	2206	1418	1418
q5	4976	4662	4680	4662
q6	234	178	131	131
q7	1931	1718	1540	1540
q8	2411	2136	2064	2064
q9	7879	7667	7376	7376
q10	4777	4688	4276	4276
q11	529	383	358	358
q12	725	748	532	532
q13	3017	3339	2832	2832
q14	269	278	253	253
q15	q16	677	703	614	614
q17	1274	1250	1254	1250
q18	7239	6682	6710	6682
q19	1106	1070	1134	1070
q20	2209	2228	1947	1947
q21	5296	4576	4458	4458
q22	520	484	410	410
Total cold run time: 56877 ms
Total hot run time: 51345 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 172472 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 05aef72e27e3a94aa3ca365928e89040cb49d65a, data reload: false

query5	4366	663	525	525
query6	333	224	196	196
query7	4382	593	304	304
query8	328	244	231	231
query9	8859	3975	3986	3975
query10	447	360	306	306
query11	5748	2615	2217	2217
query12	191	131	126	126
query13	1358	600	471	471
query14	6161	5468	5162	5162
query14_1	4524	4497	4464	4464
query15	220	207	189	189
query16	983	469	457	457
query17	1166	755	617	617
query18	2531	493	374	374
query19	224	216	168	168
query20	143	136	138	136
query21	220	138	120	120
query22	13739	13590	13382	13382
query23	17492	16616	16190	16190
query23_1	16404	16249	16390	16249
query24	7572	1776	1323	1323
query24_1	1330	1322	1348	1322
query25	588	515	447	447
query26	1322	312	178	178
query27	2705	562	352	352
query28	4451	2009	2023	2009
query29	1042	649	527	527
query30	320	243	206	206
query31	1154	1087	946	946
query32	99	76	79	76
query33	579	433	315	315
query34	1191	1166	649	649
query35	781	810	704	704
query36	1397	1400	1277	1277
query37	155	104	93	93
query38	3218	3173	3081	3081
query39	942	925	896	896
query39_1	876	887	880	880
query40	234	148	126	126
query41	68	62	61	61
query42	114	109	107	107
query43	333	336	290	290
query44	
query45	216	204	201	201
query46	1076	1188	759	759
query47	2430	2399	2316	2316
query48	394	417	294	294
query49	633	497	383	383
query50	1000	355	243	243
query51	4413	4267	4227	4227
query52	103	110	94	94
query53	250	292	202	202
query54	310	266	258	258
query55	94	91	84	84
query56	301	311	309	309
query57	1453	1423	1332	1332
query58	301	269	268	268
query59	1590	1647	1455	1455
query60	328	324	299	299
query61	167	159	159	159
query62	710	658	588	588
query63	240	208	203	203
query64	2454	799	635	635
query65	
query66	1722	492	360	360
query67	29968	29918	29729	29729
query68	
query69	472	348	303	303
query70	1067	1004	995	995
query71	303	273	260	260
query72	3019	2729	2484	2484
query73	873	789	448	448
query74	5168	4963	4812	4812
query75	2718	2621	2298	2298
query76	2300	1151	795	795
query77	401	413	349	349
query78	12532	12584	11953	11953
query79	1480	1028	720	720
query80	642	545	460	460
query81	460	290	244	244
query82	1424	165	123	123
query83	351	290	249	249
query84	265	142	113	113
query85	950	534	468	468
query86	527	328	308	308
query87	3442	3393	3231	3231
query88	3611	2721	2691	2691
query89	443	390	345	345
query90	1984	186	189	186
query91	181	173	138	138
query92	87	89	70	70
query93	1509	1379	957	957
query94	532	359	309	309
query95	683	491	358	358
query96	1040	800	318	318
query97	2759	2780	2611	2611
query98	248	230	228	228
query99	1191	1149	1025	1025
Total cold run time: 255983 ms
Total hot run time: 172472 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31669 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit b621e185df11de1d4d72ebc0a5ce8261c91439b7, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17942	4041	4005	4005
q2	q3	10755	1430	818	818
q4	4680	466	340	340
q5	7546	2362	2097	2097
q6	242	174	137	137
q7	960	789	652	652
q8	9386	1703	1456	1456
q9	5189	4950	5004	4950
q10	6388	2285	1856	1856
q11	454	281	250	250
q12	631	430	300	300
q13	18141	3350	2805	2805
q14	275	264	247	247
q15	q16	824	775	717	717
q17	1007	1003	976	976
q18	7067	5720	5524	5524
q19	1321	1284	1156	1156
q20	609	475	295	295
q21	6254	2977	2714	2714
q22	467	441	374	374
Total cold run time: 100138 ms
Total hot run time: 31669 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4957	4901	4794	4794
q2	q3	4975	5303	4638	4638
q4	2092	2179	1390	1390
q5	5005	4731	4676	4676
q6	235	185	144	144
q7	1941	1745	1594	1594
q8	2449	2198	2139	2139
q9	8005	7417	7448	7417
q10	4730	4697	4236	4236
q11	522	379	355	355
q12	725	744	533	533
q13	3014	3404	2791	2791
q14	276	270	263	263
q15	q16	688	711	610	610
q17	1286	1276	1262	1262
q18	7335	6963	6829	6829
q19	1113	1084	1115	1084
q20	2234	2214	1930	1930
q21	5313	4634	4554	4554
q22	538	457	415	415
Total cold run time: 57433 ms
Total hot run time: 51654 ms

@xy720 xy720 requested review from gavinchou and luwei16 as code owners May 27, 2026 05:28
@xy720
Copy link
Copy Markdown
Member Author

xy720 commented May 27, 2026

run buildall

@xy720
Copy link
Copy Markdown
Member Author

xy720 commented May 27, 2026

/review

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 171977 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit b621e185df11de1d4d72ebc0a5ce8261c91439b7, data reload: false

query5	4327	681	532	532
query6	358	217	209	209
query7	4234	602	306	306
query8	325	241	254	241
query9	8825	4160	4132	4132
query10	450	358	299	299
query11	5778	2439	2259	2259
query12	187	130	124	124
query13	1280	599	437	437
query14	6112	5489	5233	5233
query14_1	4477	4483	4430	4430
query15	214	205	186	186
query16	1002	448	417	417
query17	986	736	589	589
query18	2444	486	361	361
query19	233	203	158	158
query20	139	135	134	134
query21	219	144	119	119
query22	13664	13615	13496	13496
query23	17368	16455	16244	16244
query23_1	16299	16203	16346	16203
query24	7548	1800	1333	1333
query24_1	1336	1326	1332	1326
query25	541	475	437	437
query26	1307	338	173	173
query27	2716	573	347	347
query28	4444	1975	1964	1964
query29	988	615	505	505
query30	307	233	198	198
query31	1121	1092	958	958
query32	107	76	73	73
query33	536	356	302	302
query34	1196	1137	663	663
query35	782	842	696	696
query36	1422	1416	1199	1199
query37	155	109	92	92
query38	3206	3126	3084	3084
query39	939	934	901	901
query39_1	880	875	878	875
query40	226	149	130	130
query41	68	63	62	62
query42	110	110	108	108
query43	329	339	318	318
query44	
query45	217	206	193	193
query46	1097	1235	714	714
query47	2310	2313	2238	2238
query48	406	415	291	291
query49	641	496	387	387
query50	1018	353	251	251
query51	4334	4276	4203	4203
query52	108	108	95	95
query53	259	285	206	206
query54	335	273	275	273
query55	104	102	91	91
query56	322	329	317	317
query57	1462	1431	1326	1326
query58	320	289	284	284
query59	1679	1662	1516	1516
query60	341	334	328	328
query61	184	182	184	182
query62	708	659	591	591
query63	247	208	207	207
query64	2488	879	713	713
query65	
query66	1713	495	386	386
query67	29743	29721	29601	29601
query68	
query69	477	353	322	322
query70	1117	1048	944	944
query71	328	281	279	279
query72	3233	2789	2380	2380
query73	877	805	466	466
query74	5090	4975	4782	4782
query75	2679	2602	2263	2263
query76	2281	1150	807	807
query77	401	408	341	341
query78	12558	12493	11803	11803
query79	1502	1010	799	799
query80	648	540	452	452
query81	458	279	238	238
query82	1392	160	126	126
query83	373	288	252	252
query84	314	143	113	113
query85	945	540	457	457
query86	438	333	350	333
query87	3436	3400	3277	3277
query88	3608	2735	2731	2731
query89	467	389	342	342
query90	2009	185	177	177
query91	180	169	141	141
query92	84	78	72	72
query93	1413	1478	887	887
query94	537	357	324	324
query95	697	482	357	357
query96	1120	785	335	335
query97	2734	2745	2633	2633
query98	245	229	227	227
query99	1176	1153	1036	1036
Total cold run time: 254972 ms
Total hot run time: 171977 ms

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one additional blocking issue in the current head: cloud restore rewrites the persisted table-property map but leaves the already-built derived TableProperty fields stale, so unsupported source in-memory/storage settings can still affect runtime behavior after restore. I did not repeat the already-known threads about replica reset ordering, dynamic storage_medium, PartitionInfo import, or partition-only restore storage metadata.

Critical checkpoints:

  • Goal/test: the PR aims to sanitize unsupported source-cluster properties during cloud restore. The current code is incomplete because derived fields are not rebuilt after the map rewrite; I did not find added test coverage proving restored cloud table properties and later partition creation use cloud defaults.
  • Scope: the patch is small and focused, but the cleanup is spread across TableProperty, PartitionInfo, and RestoreJob, which makes missed parallel state more likely.
  • Concurrency/lifecycle: no new concurrency primitive is introduced. The affected lifecycle issue is object state consistency: TableProperty is deserialized and built before resetPropertiesForRestore mutates its properties map.
  • Configuration/compatibility: no new config or storage-format compatibility change.
  • Parallel paths: full-table and partition restore paths are touched; existing review threads already cover other incomplete paths/keys.
  • Conditional checks: cloud-mode branching is clear, but it must keep both persisted properties and derived fields consistent.
  • Tests: no new regression/unit test was present in the diff; cloud restore tests should cover table properties, partition properties, dynamic partition properties, and future partition creation after restore.
  • Observability: no new observability need beyond deterministic tests for the restored metadata.
  • Transactions/persistence/data correctness: the issue affects persisted/restored metadata semantics and can make future partitions inherit unsupported settings despite the persisted property map being sanitized.
  • FE/BE variables/performance: no new FE-BE variable passing or notable performance concern found.

User focus: no additional user-provided review focus was supplied.

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31742 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 46f309f82dae4728e7bdebef909c5fb15bcb1aa4, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17591	4041	4013	4013
q2	q3	10816	1420	835	835
q4	4688	481	346	346
q5	7560	2285	2080	2080
q6	235	178	137	137
q7	918	808	640	640
q8	9386	1772	1640	1640
q9	5260	5003	4985	4985
q10	6381	2176	1879	1879
q11	421	277	249	249
q12	630	418	308	308
q13	18081	3329	2743	2743
q14	261	264	236	236
q15	q16	819	765	709	709
q17	945	961	968	961
q18	6849	5785	5612	5612
q19	1330	1358	1166	1166
q20	570	539	299	299
q21	6214	2958	2553	2553
q22	480	462	351	351
Total cold run time: 99435 ms
Total hot run time: 31742 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4738	4810	4720	4720
q2	q3	4867	5305	4675	4675
q4	2107	2186	1409	1409
q5	5032	4663	4717	4663
q6	232	180	134	134
q7	1906	1753	1546	1546
q8	2474	2105	2183	2105
q9	7997	7448	7441	7441
q10	4735	4662	4207	4207
q11	548	385	353	353
q12	730	740	537	537
q13	3009	3398	2816	2816
q14	282	270	263	263
q15	q16	680	698	620	620
q17	1276	1251	1242	1242
q18	7256	6945	6836	6836
q19	1113	1080	1083	1080
q20	2245	2204	1933	1933
q21	5269	4546	4393	4393
q22	508	485	419	419
Total cold run time: 57004 ms
Total hot run time: 51392 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 171808 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 46f309f82dae4728e7bdebef909c5fb15bcb1aa4, data reload: false

query5	4305	648	521	521
query6	316	214	192	192
query7	4216	572	317	317
query8	351	234	218	218
query9	8778	4071	4054	4054
query10	472	348	305	305
query11	5836	2482	2270	2270
query12	179	131	126	126
query13	1335	629	415	415
query14	6109	5480	5225	5225
query14_1	4491	4533	4457	4457
query15	217	207	185	185
query16	1079	465	448	448
query17	1175	750	611	611
query18	2587	487	360	360
query19	233	208	170	170
query20	140	134	131	131
query21	217	143	116	116
query22	13760	13645	13373	13373
query23	17269	16512	16128	16128
query23_1	16286	16373	16418	16373
query24	7451	1779	1318	1318
query24_1	1313	1315	1339	1315
query25	580	497	442	442
query26	1340	310	175	175
query27	2704	552	355	355
query28	4414	1976	2011	1976
query29	1038	651	533	533
query30	302	241	199	199
query31	1126	1100	968	968
query32	91	78	75	75
query33	550	371	336	336
query34	1182	1157	651	651
query35	766	780	697	697
query36	1412	1431	1229	1229
query37	154	104	92	92
query38	3217	3201	3078	3078
query39	923	913	912	912
query39_1	873	883	864	864
query40	233	143	123	123
query41	64	63	61	61
query42	108	109	108	108
query43	329	333	292	292
query44	
query45	219	202	192	192
query46	1067	1183	774	774
query47	2395	2417	2229	2229
query48	405	404	309	309
query49	635	517	382	382
query50	963	350	254	254
query51	4390	4369	4267	4267
query52	102	103	91	91
query53	260	278	203	203
query54	305	264	261	261
query55	96	93	84	84
query56	294	313	299	299
query57	1422	1404	1319	1319
query58	297	260	266	260
query59	1573	1633	1487	1487
query60	318	316	314	314
query61	157	156	160	156
query62	704	651	589	589
query63	241	202	210	202
query64	2397	799	631	631
query65	
query66	1691	481	360	360
query67	29771	29602	29590	29590
query68	
query69	462	340	301	301
query70	976	1047	977	977
query71	305	275	267	267
query72	3126	2703	2422	2422
query73	887	764	450	450
query74	5094	4953	4772	4772
query75	2689	2599	2287	2287
query76	2302	1139	798	798
query77	397	419	341	341
query78	12462	12463	11817	11817
query79	1494	1052	772	772
query80	794	534	451	451
query81	483	282	247	247
query82	1337	160	129	129
query83	345	276	250	250
query84	255	148	119	119
query85	908	528	468	468
query86	443	336	332	332
query87	3433	3363	3240	3240
query88	3617	2749	2735	2735
query89	457	392	344	344
query90	1790	179	179	179
query91	178	170	140	140
query92	79	79	76	76
query93	1488	1393	875	875
query94	625	383	320	320
query95	686	465	349	349
query96	1105	780	337	337
query97	2751	2737	2620	2620
query98	239	231	233	231
query99	1178	1183	1031	1031
Total cold run time: 254543 ms
Total hot run time: 171808 ms

@xy720
Copy link
Copy Markdown
Member Author

xy720 commented May 27, 2026

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one additional blocker beyond the already-open review threads. The PR is trying to sanitize cloud restore metadata, but the dynamic-partition storage-policy path is still not normalized, so restored dynamic partitions can continue to use source-cluster storage policy settings.

Critical checkpoint conclusions:

  • Goal/test: The goal is only partially met; existing threads plus the new comment show cloud restore can still preserve unsupported source properties. I did not see a regression test covering these cloud restore property combinations.
  • Scope/clarity: The change is focused, but the property cleanup is split across table, partition, and restore paths, which has led to missed derived/dynamic fields.
  • Concurrency/lifecycle: No new concurrency or non-trivial lifecycle issue found in the reviewed code paths; restore/replay ordering was considered.
  • Configuration/compatibility: No new config or storage-format incompatibility found.
  • Parallel paths: Full-table restore and selected-partition restore now both have some normalization, but existing threads still cover gaps in ordering/derived fields and partition-level restore handling.
  • Tests: Missing cloud-mode restore coverage for unsupported table, partition, and dynamic partition properties.
  • Observability/performance: No additional observability or performance issue found.

User focus: no additional user-provided review focus was specified.

@xy720
Copy link
Copy Markdown
Member Author

xy720 commented May 27, 2026

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the current PR diff and the existing inline review context. I am not adding duplicate inline comments because the remaining blocker is already covered by #63696 (comment).

Blocking issue still present:

  • TableProperty.resetPropertiesForRestore() still calls PropertyAnalyzer.getInstance().rewriteForceProperties(properties) before setReplicaAlloc(replicaAlloc). In cloud restore with reserveReplica=false, setReplicaAlloc() writes default.replication_allocation back into properties after the cloud analyzer deleted that key, and no second cloud rewrite runs before persisting the restored table property. This can still leave a restored cloud table carrying the restore replica allocation property that the PR is trying to strip. Please move the cloud rewrite after restore-specific mutations or make this restore path avoid persisting the unsupported default replica allocation in cloud mode.

Checkpoint conclusions:

  • Goal/test: The goal is to normalize unsupported table and partition restore metadata in cloud mode. The current code only partially accomplishes this because the replica allocation property can still be reintroduced. No new regression or unit test is added in this PR.
  • Scope: The change is focused on restore metadata normalization, but the ordering in TableProperty still leaves a correctness gap.
  • Concurrency/lifecycle: No new thread or lifecycle management issue found in the modified code; restore metadata mutation follows existing restore paths.
  • Config/compatibility: No new configuration item or storage format incompatibility found.
  • Parallel paths: Full-table and selected-partition restore paths are both touched; selected-partition sanitization is now present in both normal and replay paths.
  • Data correctness/persistence: The remaining property reintroduction means persisted restored table properties can still contain cloud-unsupported replica metadata.
  • Observability/performance: No additional observability or performance issue found.
  • User focus: No additional user-provided review focus was specified.

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 0.00% (0/27) 🎉
Increment coverage report
Complete coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants